<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../../style/common.css" />
<title>保健所検索</title>
<script type="text/javascript">
	function onLoad() {
		var areaList = document.getElementById("areaselect");
		window.android.getAreaMA100061();
	}
	function setArea() {
		var jouhou = window.android.getAreaListMA100061();
		var areaList = document.getElementById("areaselect");
		var locationList = document.getElementById("locationselect");
		if (null == jouhou || jouhou.size() == 0) {
			areaList.disabled = true;

		} else {
			areaList.options.add(new Option("", ""));
			for ( var i = 0; i < jouhou.size(); i++) {
				areaList.options.add(new Option(jouhou.get(i), jouhou.get(i)));
			}
		}
		if (areaList.value == "") {
			locationList.disabled = true;
		} else {
			locationList.disabled = false;
		}
		window.android.cancelP();
	}
	function changed() {
		var areaList = document.getElementById("areaselect");
		var curstr = areaList.value;
		var locationList = document.getElementById("locationselect");
		window.android.getLocationMA100061(curstr);
		if (areaList.value == "") {
			locationList.disabled = true;
		} else {
			locationList.disabled = false;
		}
	}

	function setLocation() {
		var jouhou = window.android.getLocationListMA100061();
		var locationList = document.getElementById("locationselect");
		locationList.options.length = 0;
		locationList.options.add(new Option("", ""));
		for ( var i = 0; i < jouhou.size(); i++) {
			locationList.options.add(new Option(jouhou.get(i), jouhou.get(i)));
		}
		window.android.cancelP();
	}

	function search() {
		var areaList = document.getElementById("areaselect");
		var area = areaList.value;
		var locationList = document.getElementById("locationselect");
		var location = locationList.value;
		if (area == "" || location == "") {
			window.android.checkAlert();

		} else {
			var length = window.android.searchMA100061(area, location).size();
			if (length > 0) {
				self.location.href = "MA-1000-6-2.html";
			} else {
				window.android.alertP();
			}
		}
	}

	function sendPhaseNoToAzure(nextUrl, buttonIndex) {
		window.android.sendPhaseNoToAzure(nextUrl, buttonIndex);
	}

	function gotoNextPage(buttonIndex) {
		window.location.href = "MA-1000-6.html";
	}
</script>
</head>

<body onload="onLoad()">
	<table width="100%" border="0">
		<tr>
			<td colspan="2"><b>ここから保健所を検索できます。</b>
				<hr class="title_divison medical_theme_background_color" />
				<p>
					保健所の情報は公表データに基づいておりますが、問い合わせの際には各保健所にあらためて詳細をご確認ください。
				</p>
				<table style="font-size: 14px;">
					<tr>
						<td>参照：</td>
						<td>みんなのメンタルヘルス（厚生労働省）</td>
					</tr>
					<tr>
						<td></td>
						<td>http://www.mhlw.go.jp/kokoro/</td>
					</tr>
				</table>
				<br/>
				</td>
		</tr>
		<tr>
			<td colspan="2"><b><font class="subtitle">【地域選択】</font></b><br />
				<a>地域をプルダウンメニューで選択する。</a></td>
		</tr>
		<tr>
			<td colspan="2">
				<table width="100%" border="0">
					<tr>
						<td width="50%"><a>都道府県</a><br /> <select id="areaselect"
							onchange="changed()"></select></td>
						<td width="50%"><a>市区町村</a><br /> <select
							id="locationselect"></select></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<br />
	<table width="100%" border="0">
		<tr style="height: 30px;">
			<td align="left">
				<div class="back_button" onclick="sendPhaseNoToAzure('MA-1000-6')">&lt;&nbsp;もどる</div>
			</td>
			<td align="right">
				<div class="next_button" onclick="search()">検索&nbsp;&gt;</div>
			</td>
		</tr>
	</table>
</body>
</html>
